//描述方块所属位置
class I {
    //颜色
    color = 'cyan';
    //形状 方块的位置
    //横向
    shape = [[0,0],[1,0],[2,0],[3,0]];
    //位置 以左上角为原点
    position = {
        x:3,
        y:0
    };
    //@param {'left'|'right'|'down'} direction 
    move(direction){
        if(direction === 'left'){
            this.position.x -= 1;
        } else if(direction === 'right'){
            this.position.x += 1;
        }else if(direction === 'down'){
            this.position.y += 1;
        }
    }
}
// 方块s
class s {
    //颜色
    color = 'lime';
    shape = [[0,1],[1,0],[1,1],[2,0]];
    //初始位置 
    position = {
        x: 4,
        y: 0
    };
    //@param {'left'|'right'|'down'} direction 
    move(direction){
        if (direction === 'left') {
            this.position.x -= 1;
        } else if (direction === 'right') {
            this.position.x += 1;
        } else if (direction === 'down') {
            this.position.y += 1;
        }
    }

}
function max(arr) {
    let num = arr[0];
    for (let i of arr) {
        if (i > num) {
            num = i;
        }
    }
    return max;
}

function min(arr) {
    let num = arr[0];
    for (let i of arr) {
        if (i < num) {
            num = i;
        }
    }
    return min;
}
//map函数
